package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;

/**
 * 设施实体类
 */
@TableName("t_damageState")
public class FacilitiesBean {
    //设施id
    @TableId(value = "pk_FacilitiesId",type = IdType.AUTO)
    private Integer id;
    //设施损坏位置
    @TableField("t_damage")
    private String damage;
    //上报时间
    @TableField("t_damageDate")
    private LocalDate damageDate = LocalDate.now();
    //设施问题状态
    @TableField("t_damageState")
    private String damageState = "未解决";
    // 房间对象
    @TableField("fk_roomId")
    private Integer roomId;
    @TableField(exist = false)
    private RoomBean roomBean;
    public FacilitiesBean(){}

    public FacilitiesBean(String damage, Integer roomId) {
        this.damage = damage;
        this.roomId=roomId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDamage() {
        return damage;
    }

    public void setDamage(String damage) {
        this.damage = damage;
    }

    public LocalDate getDamageDate() {
        return damageDate;
    }

    public void setDamageDate(LocalDate damageDate) {
        this.damageDate = damageDate;
    }

    public String getDamageState() {
        return damageState;
    }

    public void setDamageState(String damageState) {
        this.damageState = damageState;
    }

    public RoomBean getRoomBean() {
        return roomBean;
    }

    public void setRoomBean(RoomBean roomBean) {
        this.roomBean = roomBean;
    }

    public Integer getRoomId() {
        return roomId;
    }

    public void setRoomId(Integer roomId) {
        this.roomId = roomId;
    }

    @Override
    public String toString() {
        return "FacilitiesBean{" +
                "id=" + id +
                ", damage='" + damage + '\'' +
                ", damageDate=" + damageDate +
                ", damageState='" + damageState + '\'' +
                ", roomId=" + roomId +
                ", roomBean=" + roomBean +
                "}\n";
    }
}
